const {con, Result} = require('./common.js');

let getAllTasks = async(userId)=>{
  let res = new Result();
  let sql = `select * from tasks where user_id = ${userId}` 

  let [rows] = await con.execute(sql);

  res.data = rows;

  return res;

};
module.exports = {getAllTasks};
